package com.monkey.luffer.springboot.demo.basis.designPatterns.proxy;

import com.monkey.luffer.springboot.demo.basis.example.User;
import com.monkey.luffer.springboot.demo.basis.springAop.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author: dengkaibing
 * @Description:
 * @Date: 2021/2/3 10:09
 * @company 甜橙金融
 * @Version: 1.0
 */
@Component
public class BuyHouseServiceImpl implements BuyHouseService{
    @Autowired
    OrderService orderService;

    @Override
    public boolean buyHouse() {
        System.out.println("买房子干大事！");
        orderService.creatOrder(User.builder().age(13).name("dkb").build(),"12");
        return true;
    }

    @Override
    public void buyCar() {
        System.out.println("!!!");
        buyHouse();

    }
}
